//    Copyright (C) Kherty.  All rights reserved.
using System;

namespace OpenLS.Spreadsheet.AnalysisToolPak
{
    internal class Farenheit : UnitBase
    {
        public Farenheit() : base("F")
        {
        }

        public override double ConvertTo(double value, UnitBase other)
        {
            if (other is Farenheit)
                return value;
            if (other is Celsius)
                return (value - 32)/1.8;
            if (other is Kelvin)
                return (value + 459.67)/1.8;
            throw new NotSupportedException();
        }
    }
}